﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace WoWConnecter
{
    public class AuthPacketOut : BasicPacketOut
    {
        public override int HeaderSize
        {
            get
            {
                return 1;
            }
        }

        public AuthServerOpCode Id { get; private set; }

        public AuthPacketOut(AuthServerOpCode opcode)
            : base((int)opcode)
        {
            Id = (AuthServerOpCode)RawId;
            WriteByte(RawId);
        }

        public override byte[] Finalize()
        {
            return (BaseStream as MemoryStream).ToArray();
        }

        public override string ToString()
        {
            return Id.ToString();
        }
    }
}
